import Vue from "vue";
import Router from "vue-router";


const Admin = () =>
  import(/* webpackChunkName: "home" */ "@/components/Admin.vue");
const examination = () =>
  import(/* webpackChunkName: "user" */ "@/components/admin/examination.vue");
const Case = () =>
  import(/* webpackChunkName: "user" */ "@/components/admin/case.vue");
Vue.use(Router);

const router = new Router({
  routes: [
    // {
    //   path: "/",
    //   redirect: "/login"
    // },
    {
      path: "/",
      component: Admin,
      children: [
        {
          // 可以匹配 /users/xxx
          path: "/examination",
          component: examination
        },
        {
          // 可以匹配 /users/xxx
          path: "/case",
          component: Case
        }
      ]
    }
  ]
});

// 导出路由对象
export default router;
